package haoyou.csnf.manager.module.pm.dal.mysql.positionsseq;

import java.util.*;

import haoyou.csnf.manager.framework.common.pojo.PageResult;
import haoyou.csnf.manager.framework.mybatis.core.query.LambdaQueryWrapperX;
import haoyou.csnf.manager.framework.mybatis.core.mapper.BaseMapperX;
import haoyou.csnf.manager.module.pm.dal.dataobject.positionsseq.PositionsSeqDO;
import org.apache.ibatis.annotations.Mapper;
import haoyou.csnf.manager.module.pm.controller.admin.positionsseq.vo.*;

/**
 * 职位序列 Mapper
 *
 * @author 好有经验源码
 */
@Mapper
public interface PositionsSeqMapper extends BaseMapperX<PositionsSeqDO> {

    default PageResult<PositionsSeqDO> selectPage(PositionsSeqPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<PositionsSeqDO>()
                .likeIfPresent(PositionsSeqDO::getSeqName, reqVO.getSeqName())
                .eqIfPresent(PositionsSeqDO::getSeqDec, reqVO.getSeqDec())
                .betweenIfPresent(PositionsSeqDO::getCreateTime, reqVO.getCreateTime())
                .eqIfPresent(PositionsSeqDO::getRemarks, reqVO.getRemarks())
                .orderByDesc(PositionsSeqDO::getId));
    }

}